import { BaseNode } from '@/components/complex/BaseNode';
import { defineComponentAndRegisterToGraph } from '@/components/complex/BaseNode/define';
import { NodeDrawer } from '@/components/complex/NodeDrawer';
import { NodeVariableMangerForm } from '@/components/complex/NodeVariableMangerForm';
import { NODE_TYPE } from '@/constants/config';

import { BlockSetting } from '../../BaseNode/components/BlockSetting';
import { DataModifyConfig } from './config';

export const DataModify = defineComponentAndRegisterToGraph(NODE_TYPE.DATA_MODIFY, (props) => {
  return (
    <NodeDrawer trigger={<BaseNode {...props} nodeType={NODE_TYPE.DATA_MODIFY} />}>
      <BlockSetting className="mb-12" />
      <NodeVariableMangerForm />
      <DataModifyConfig />
    </NodeDrawer>
  );
});
